package mainpackage;

public class Item {
	private String id; // an unique code
	private String name;
	private double price;
	private Category category;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public Category getCategory() {
		return category;
	}

	public void setCategory(String category) {
		switch (category) {
		case "ENTREE":
			this.category = Category.ENTREE;
			break;
		case "MAIN_COURSE":
			this.category = Category.MAIN_COURSE;
			break;
		case "SIDE_DISH":
			this.category = Category.SIDE_DISH;
			break;
		case "DESERT":
			this.category = Category.DESERT;
			break;
		case "DRINK":
			this.category = Category.DRINK;
			break;
		}
	}

}
